package com.cevent.community.app.common.dto;

<#list typeSet as type>
    <#if type=="Date">
        import java.util.Date;
        import com.fasterxml.jackson.annotation.JsonFormat;
    </#if>
    <#if type=="BigDecimal">
        import java.math.BigDecimal;
    </#if>
</#list>

/**
 * @author cevent
 * @description:freemarker 自动生成器 ${tableNameCN}
 */
public class ${Domain}Dto{
    <#list fieldUtilList as field>
        //${field.comment}
        <#if field.javaType="Date">
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        </#if>
        private ${field.javaType} ${field.nameSmallHump};
    </#list>

    <#list fieldUtilList as field>
        public ${field.javaType} get${field.nameBigHump}() {
        return ${field.nameSmallHump};
        }
        public void set${field.nameBigHump}(${field.javaType} ${field.nameSmallHump}) {
        this.${field.nameSmallHump} = ${field.nameSmallHump};
        }
    </#list>

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("getClass().getSimpleName(){");
        <#list fieldUtilList as field>
            <#if field_index=0>
            sb.append("${field.nameSmallHump}='").append(${field.nameSmallHump}).append('\'');
            </#if>
            sb.append(", ${field.nameSmallHump}='").append(${field.nameSmallHump}).append('\'');
        </#list>
        sb.append('}');
        return sb.toString();
    }
}